'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

exports.default = {
    empty: function empty(object) {
        var type = typeof object;
        if (type === 'undefined') {
            return true;
        }
        if (object == null) {
            return true;
        }
        if (type === 'string') {
            return object === '';
        }
        if (type === 'array') {
            return object.length === 0;
        }
        if (type === 'function') {
            return false;
        }
        try {
            if (object.hasOwnProperty('length')) {
                return object.length === 0;
            }
        } catch (e) {
            // coo.warn(e);
        }
        if (type === 'object') {
            for (var key in object) {
                return false;
            }
            return true;
        }
        return false;
    },
};